package stool.observerpattern.part1;

/**
 * @Author Felix YF Dong
 * @Date 2021/5/7
 */
public abstract class Observer {

    private String name;

    private Subject subject;

    public Observer (String name, Subject subject) {
        this.name = name;
        this.subject = subject;
    }

    public abstract void update();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Subject getSubject() {
        return subject;
    }

    public void setSubject(Subject subject) {
        this.subject = subject;
    }
}
